/* 
 * File:   seasontest.cpp
 * Author: dolphinigle
 *
 * Created on March 16, 2011, 2:54 PM
 */

#include <stdlib.h>
#include "gtest/gtest.h"
#include "season.hpp"

/*
   static int getSeasonCount();

  // ids are 0-indexed
  static std::string getSeasonName(int season_id);

  // mask stores the mask of possible seasons. The least-important-bit
  // represents season_id 0, and so on. (i.e., little endian)
  // returns getSeasonCount() elements, the i-th element is true iff
  // season_id i is possible.
  static std::vector<bool> getPossibleSeasons(int mask);

  static std::string getSeasonDescription(int season_id);*/

TEST(SeasonTest, All) {
  for (int i = 0; i < (1 << Season::getSeasonCount()); ++i) {
    std::vector<bool> unmask = Season::getPossibleSeasons(i);
    EXPECT_EQ((int)unmask.size(), Season::getSeasonCount());
    int k = i;
    for (int j = 0; j < Season::getSeasonCount(); ++j) {
      EXPECT_EQ(k%2, unmask[j]);
      k /= 2;
    }
  }

}

